home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-16 | 7.7 KB | 161 lines | [TEXT/KAHL] |
- Welcome to 'The Journal'. This file describes how to use The Journal,
- and gives an introduction to the source code that comes with it.
-
- All of the code is written in ThinkC (4.0.4). The only code that is
- not provided is that used for displaying the INITs icon at startup.
- This code was taken from
- The Macintosh Programming Primer Volume II:
- Mastering the Toolbox using Think C
- by Dave Mark
- Addison-Wesley, 1990 (ISBN 0-201-57016-5)
-
- The program and source is in the public domain. It is totally free.
- You do not have the right to charge for it. If you use it in you own
- programs, please acknowledge the source. If you make changes, please let
- me know.
-
- What does The Journal Do:
- =========================
-
- The Macintosh is an event driven machine. Every time the user types a key,
- chooses a menu item, or clicks the mouse an event is generated. This event
- is read by the currently active application (or the Finder) and some kind
- of action results.
-
- In the course of my studies, I found that I needed something that captured
- what the user did on the keyboard. Although macro packages and screen recording
- programs caught a lot of user events, they did not catch the mistakes. What if the
- user pressed the wrong key ? I needed a program that caught all events, and attached
- a time stamp to them.
-
- This is what The Journal does. It captures most events (see How Does It Do It below)
- that occur at the keyboard or the mouse (or even disk insertions). These are recorded
- to a file. Granted, the formatting could be better. But what do you expect for a not
- quite first version ?
-
-
- How to Use The Journal:
- =======================
-
- To use The Journal drag it into your system folder and reboot your machine.
- Next open up your control panel. IMPORTANT: Hold down the Option key when you
- select the Control Panel from the Apple menu. If you do not, The Journal will
- only record a few events.
-
- Once you have selected The Journal in the control panel, you can do a couple
- of things. First, you can change the type of file that The Journal creates.
- By default, the file will be a Microsoft Word text file. To change the application
- used to read the text file, hit the 'Set Journal File Type' button. You will be given
- a typical open dialog, select an application that can read text files. Unfortunately,
- the 'Current Creator' will not reflect the change until you re-select The Journal in
- the Control Panel (sighh).
-
- You can also specify if you want time stamps in the journal file. The default is to
- have no time stamps. If you want them, simply click the 'Time Stamps' checkbox.
- Adding time stamps will roughly double the size of the file created.
-
- So far, you can not start the driver going. To do that you must first specify a file
- to write to. Do this using the 'Set Journal File' button. You will get a standard
- Macintosh save file dialog box. If you hit OK, the 'Start' button will be enabled.
-
- To start the journaling, hit the 'Start' button. You can only do this if you have
- picked a file to journal too. Once you press this button, the journaling commences.
- Notice that other buttons dim out, and the name of the 'Start' button changes to 'Stop'.
- To stop journaling, hit the 'Stop' button.
-
- You can close the Control Panel if you wish. It will not effect the journaling process.
-
- WARNING: The Journal uses the same method of catching events as MacroMaker. If you use
- MacroMaker, it will muck up The Journal, and vice versa. The Journal is NOT compatible
- with MacroMaker.
-
-
- This archive should contain the following folders and files:
- ============================================================
-
- README FIRST - this file
-
- cdev - folder for the cdev project
- The Journal - the actual journal driver cdev/INIT/DRVR combination
- Journal cdev π - the journal cdev project
- Journal cdev π.rsrc - the resources for the cdev project (see notes below)
- Journal cdev.c - C source for the journal cdev object
- Journal cdev.h - header file for the journal cdev object
-
- install DRVR INIT - folder for the installer INIT project
- driver.c - the code that does all the work of installing (not mine)
- driver.h - include file for driver.c (not mine)
- installJournalDriver.c - code to call the installation routine
- installJournalDriver.h - the header file for installJournalDriver.c
- Journal INIT - a compiled version of the INIT
- Journal INIT.π - the install INIT project
- Journal INIT.π.rsrc - resources for the INIT project
-
- journal Driver - folder for the driver project
- Journal Driver - a compiled version of the driver (see notes below)
- Journal Driver.π - the project for the journal driver
- journalDriver.c - C code for the journal driver (and lots of it)
- journalDriver.h - header file for the journal driver
- journalDriverInclude.h - shared header file for communication with the driver
-
- How Does It Do It:
- ==================
-
- The Macintosh Event Manager contains something called the Journaling Mechanism. You can
- set up a driver that will get called every time the active application calls GetNextEvent,
- WaitNextEvent, EventAvail, and a few other calls. The Journal uses the Journaling
- Mechanism to trap events as the application makes the event calls.
-
- That means a couple of things. First, since MacroMaker also uses the Journaling Mechanism,
- it will conflict with The Journal. Second, if Applications do things in a stupid way,
- The Journal will reflect that. For example, Microsoft Word makes three calls for every
- keypress (why, how should I know !). That means every keystroke in typing is recorded
- three times ! TTThhhaaattt iiisss rrreeeaaalllyyy ddduuummmbbb !!! But what can you do.
-
- Notes On Compiling The Journal:
- ===============================
-
- If you are going to use the code, you need to know how to build the final project.
- The file 'Journal cdev π.rsrc' contains all the resources for the cdev, plus all
- of the resources from the other two projects. That means if you make changes to
- either the INIT or the DRVR, you have to build those components, then copy the
- resulting resources (DRVR, INIT, or whatever you add) to the 'Journal cdev π.rsrc'
- file BEFORE you build the final integrated cdev/INIT/DRVR.
-
- Also, if you rebuild the DRVR, it is EXTREEMLY important to change the resource
- flags of both the DRVR and the DATA resource. They should both be 'System Heap' and
- 'Locked'. If not, The Journal WILL NOT WORK. And changing the attributes in the INIT
- does NOT help.
-
- How to Contact Me (and what I can do):
- ======================================
-
- First of all a disclaimer. This is NOT a commercial product. I do not guarenttee it in
- any way, manner, shape, or form. If it does something nasty to you, it is on your head.
- I also am not committed to supporting this program. I am releasing it because other
- researchers may find it useful. And other programmers can get saved the troubles of
- figuring out how to do things.
-
- I do intend to make some changes to The Journal. It needs a lot of cleaning up and
- a fair bit of documenting. There are also other features I want to add, like picking
- up the name of an icon that is clicked on, getting the file that is chosen from
- a dialog, and a few others.
-
- As to how to contact me. I am currently completing my MsC at the University of Calgary.
- I am likely to be out of there by May (though they are likely to know where to find me).
- However, the University is NOT a phone service. You can send mail to me there, but do NOT
- phone the office, they will NOT give out my number, or forward messages. They have
- enough to do already. Also, do NOT phone me at home (unless you want to offer me a job !).
- Feel free to email or smail (snail mail) me. I will respond to everything at some point.
-
- Maurice Sharp
- Knowledge Science Lab
- Department of Computer Science
- University of Calgary
- 2500 University Dr. N.W.
- Calgary, AB
- Canada
- T2N 1N4
-
- Internet: sharp@cpsc.ucalgary.ca GEnie: M.SHARP5
-